package day08;

public class Test02 {
    public static void main(String[] args) {
        Person p = new Person();
        Person p1 = new Person("wang");
        Person p2 = new Person("wang",12,"wngq");
        p1.eat();

    }




    }

//1.创建一个名为person的类
class Person{
    //2.定义person类的属性
    String name;
    int age;
    String address;

    //3.创建全残构造方法
    public Person(String name , int age , String address){
        this.name = name;
        this.age = age;
        this.address = address;
        System.out.println("我是prson类的全残构造方法");
    }
//    //创建无参构造方法
    public Person(){
        System.out.println("我是无参构造方法");
    }
    //创建韩构造方法
    public Person(String name){
        System.out.println("我是含参构造方法");
    }
    //创建普通构造方法
    public void eat(){
        System.out.printf("我是普通方法");
    }
}